import service from "@/api/request";

export const useAccountLoginApi = (data: any) => {
  return service.post("/user/login/account", data);
};

export const useRegisterApi = (data: any) => {
  return service.post("/user/register", data);
};

export const useUserInfoApi = () => {
  return service.get("/user/info")
}

export const useUploadPictureApi = (data: any) => {
  return service.post("/user/upload",data,{ 
    headers: { 'Content-Type':'multipart/form-data'}
  })
}

export const useUpdateInfoApi = (data: any) => {
  return service.put("/user/update",data)
}

export const useSendEmailApi = (data: any) => {
  return service.post("/user/email",data)
}

export const useEmailLoginApi = (data: any) => {
  return service.post("/user/login/email",data)
}

export const useBindEmailApi = (data: any) => {
  return service.put("/user/bind/email",data)
}


export const useLogoutApi = () => {
  return service.post("/user/logout")
}


